package com.qst.crop.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.LocalDateTime;


@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Discuss {
    private Integer discussId;
    private Integer knowledgeId;
    private String ownName;
    private String content;
    private LocalDateTime createTime;
    private String avatar;

    public Discuss(Integer knowledgeId, String ownName, String content){
        this.discussId = null;
        this.knowledgeId = knowledgeId;
        this.content = content;
        this.ownName = ownName;
        this.createTime =LocalDateTime.now();
    }
}
